<?php
header("Content-Type:text/html;charset=UTF-8");
header('Access-Control-Allow-Origin:*'); // *代表允许任何网址请求

$servername = "localhost:3306";
$username = "root";
$password = "root";
$dbname = "student";
 
// 创建连接
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
    die("连接失败: " . mysqli_connect_error());
}
?>